class xT_GFx_SelectionRing extends x_GFx_Menu;

//=============================================================================
// Functions: ActionScript functions calls
//=============================================================================
function InitSelectionMenu(int aUnitQuantity)
{
     ActionScriptVoid("InitSelectionMenu");
	 mGameInfo.GetPlayerController().SetBlockMouseInput(true);
}

//=============================================================================
// Functions: UnrealScript functions calls from ActionScript
//=============================================================================


//=============================================================================
// Functions: Init and Close. Used to ignore mouse input
//=============================================================================
function InitUI(x_GameInfo aGameInfo, optional LocalPlayer LocPlay)
{
	super.InitUI(aGameInfo, LocPlay);
	mGameInfo.GetPlayerController().SetBlockMouseInput(true);
}

event OnClose()
{
	SelectUnit(GetVariableNumber("_root.SelectedUnitIndex"));
	mGameInfo.GetPlayerController().SetBlockMouseInput(false);
	super.OnClose();
}

function SelectUnit(int aUnitIndex)
{
	xT_PlayerController(mGameInfo.GetPlayerController()).SelectedUnitsClear();
	xT_PlayerController(mGameInfo.GetPlayerController()).SelectPlayerUnit(xT_PlayerController(mGameInfo.GetPlayerController()).AllUnits[aUnitIndex]);
}

//=============================================================================
// Default Properties
//=============================================================================
DefaultProperties
{
	MovieInfo = SwfMovie'xLED_UI.Tactics_SelectionRing'
	bPauseGameWhileActive = true
}
